<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>VIP管理系统-控制台</title>
		<meta name="keywords" content="song" />
		<meta name="description" content="song" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!-- basic styles -->
		<link href="/Public/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="/Public/assets/css/font-awesome.min.css" />


		<link rel="stylesheet" href="/Public/assets/css/family.css" />

		<link rel="stylesheet" href="/Public/assets/css/ace.min.css" />
		<link rel="stylesheet" href="/Public/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="/Public/assets/css/ace-skins.min.css" />
	   <script src="/Public/assets/js/jquery-2.0.3.min.js"></script>
		<script src="/Public/admin/js/base.js"></script>
		
<style type="text/css" >
    .red{color: red;}
    body{ background: #fff;}
    .footer {
    width: 100%;
    height: 50px;
    position: fixed;
    bottom: 0;
   
    left: 0;
    line-height: 50px;
    text-align: right;
    text-align: right;
    border-top: solid 1px #eee;
    padding-right: 10px;
    z-index: 999999999999999;
}
</style>

	</head>
      <style type="text/css">
      .datalist_current_ahref{
	background: #6fb3e0!important;
		}
		.btn-light,.btn-info{
		   margin-right: 3px;
		}
</style>
<body>

    <!--弹窗插件-->
<link rel="stylesheet" href="/Public/artdialog/skins/blue.css" />
<script type="text/javascript" src="/Public/artdialog/artDialog.js"></script>
<script type="text/javascript" src="/Public/artdialog/plugins/iframeTools.source.js"></script>
<script type="text/javascript" src="/Public/artdialog/common_opfun.js"></script>

<!--提示插件-->
<link rel="stylesheet" href="/Public/notifit/notifIt.css" />
<script src="/Public/notifit/notifIt.js"></script>



    <div class="row">
    <div class="col-md-9">
        <div class="block-web">
            <div class="header">
                <h3 class="content-header"><?php if($is_add == 0): ?>新增<?php else: ?>编辑<?php endif; ?>菜单</h3>
            </div>
            <div class="porlets-content">
                <form class="form-horizontal row-border vform" action="<?php echo U('Nav/add_menu');?>" method="post">
                     <input type="hidden" name="is_add" value="<?php echo ($is_add); ?>">
                    <input type="hidden" name="id" value="<?php echo ($m['id']); ?>">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">菜单名称</label>
                        <div class="col-sm-8">
                            <input type="text" name="name" class="form-control"  value="<?php echo ($m['name']); ?>" datatype="*"   nullmsg="请输入菜单名称！" >
                            <div class="Validform_checktip"></div>
                        </div>
                        <div class="col-sm-1">
                            <span class="red">*</span>
                        </div>
                    </div><!--/form-group-->
                    <div class="form-group">
                        <label class="col-sm-3 control-label">菜单地址</label>
                        <div class="col-sm-8">
                            <input type="text" name="name_url" class="form-control"  value="<?php echo ($m['name_url']); ?>"   nullmsg="请输入菜单地址" sucmsg="菜单地址验证通过！">
                            <div class="Validform_checktip"></div>
                        </div>
                        <div class="col-sm-1">
                            <span class="red"></span>
                        </div>
                    </div><!--/form-group-->
            <!--         <div class="form-group">
                        <label class="col-sm-3 control-label">排序</label>
                        <div class="col-sm-8">
                            <input type="text" name="sort" class="form-control" value="<?php echo ((isset($m['sort']) && ($m['sort'] !== ""))?($m['sort']):'0'); ?>" datatype="n" nullmsg="请输入排序">
                            <div class="Validform_checktip"></div>
                        </div>
                        <div class="col-sm-1">
                            <span class="red">*</span>
                        </div>
                    </div> --><!--/form-group-->
                    <div class="form-group">
                        <label class="col-sm-3 control-label">排序</label>
                        <div class="col-sm-8">
                            <input type="text" name="sort" class="form-control" value="<?php echo ((isset($m['sort']) && ($m['sort'] !== ""))?($m['sort']):'0'); ?>" datatype="n" nullmsg="请输入排序">
                            <div class="Validform_checktip"></div>
                        </div>
                        <div class="col-sm-1">
                            <span class="red">*</span>
                        </div>
                    </div><!--/form-group-->

                    <div class="form-group">
                        <label class="col-sm-3 control-label">父级菜单</label>
                        <div class="col-sm-8">
                            <select    id="parent_id" name="parent_id" class="form-control" style="height: 35px;" >
                                    <option value="0">顶级菜单 </option>
                                    <?php if(is_array($parentlist)): $i = 0; $__LIST__ = $parentlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$m): $mod = ($i % 2 );++$i;?><option value="<?php echo ($m['id']); ?>">
                                            <?php echo print_nbsp($m['count']);?>|-<?php echo ($m['name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div><!--/col-sm-9-->

                        <div class="col-sm-1">
                            <span class="red">*</span>
                        </div>
                    </div>

                    <?php if($is_add == 1): ?><div class="form-group">
                            <label class="col-sm-3 control-label">是否有效</label>
                            <div class="col-sm-9">
                                <label class="radio-inline">
                                    <input type="radio"  <?php if($status == 1): ?>checked<?php endif; ?> name="closed" value="1" id="inlineradio1" >
                                    <span class="custom-radio"></span> 启用 </label>
                                <label class="radio-inline">
                                    <input type="radio"  name="closed"  <?php if($status == 0): ?>checked<?php endif; ?>  value="0" id="inlineradio2">
                                    <span class="custom-radio"></span> 禁止 </label>
                            </div>
                        </div>
                        <?php else: ?>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">是否有效</label>
                            <div class="col-sm-9">
                                <label class="radio-inline">
                                    <input type="radio"  checked name="closed" value="1" id="inlineradio1" >
                                    <span class="custom-radio"></span> 启用 </label>
                                <label class="radio-inline">
                                    <input type="radio"  name="closed" value="0" id="inlineradio2">
                                    <span class="custom-radio"></span> 禁止 </label>
                            </div>
                        </div><?php endif; ?>

                    <?php if($is_add == 1): ?><div class="form-group">
                            <label class="col-sm-3 control-label">是否显示</label>
                            <div class="col-sm-9">
                                <label class="radio-inline">
                                    <input type="radio"  <?php if($is_display == 1): ?>checked<?php endif; ?> name="is_menu" value="1" id="inlineradio1" >
                                    <span class="custom-radio"></span> 启用 </label>
                                <label class="radio-inline">
                                    <input type="radio"  name="is_menu"  <?php if($is_display == 0): ?>checked<?php endif; ?>  value="0" id="inlineradio2">
                                    <span class="custom-radio"></span> 禁止 </label>
                            </div>
                        </div>
                        <?php else: ?>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">是否显示</label>
                            <div class="col-sm-9">
                                <label class="radio-inline">
                                    <input type="radio" checked   name="is_menu" value="1" id="inlineradio1" >
                                    <span class="custom-radio"></span> 启用 </label>
                                <label class="radio-inline">
                                    <input type="radio"  name="is_menu"  value="0" id="inlineradio2">
                                    <span class="custom-radio"></span> 禁止 </label>
                            </div>
                        </div><?php endif; ?>
                    <div class="footer" >
                        <button class="btn btn-primary btn-success bt_submit" type="submit">提交</button>
                        <button class="btn btn-default bt_close" type="button" onclick="art.dialog.open.api.close();" >关闭</button>
                    </div>
                </form>
            </div><!--/porlets-content-->
        </div><!--/block-web-->
    </div><!--/col-md-6-->

    </div>


<!--引入弹窗插件-->
    <div id="_show_public_loading_div" class="_show_public_loading_div" style=" position: fixed; left: 45%;top: 0px;height: 40px;
	    line-height: 40px;
	    width: 150px;
	    text-align: center;
	    background: #5CB85C;
	    border-bottom-left-radius: 8px;
	    border-bottom-right-radius: 8px;
	    border: 2px solid #F9F7F7;
	    border-top: none;
	    box-shadow: 0px 0px 10px #B1ADAD;
	    color: #FFF;z-index:99999999; ">
     <img src="/Public/Admin/images/icon32_loading_light218877.gif" style="width:20px;vertical-align: middle;">
        处理中...
    </div>

		<!-- basic scripts -->

		<!--[if !IE]> -->
			<script src="/Public/assets/js/jquery-2.0.3.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='/Public/assets/js/jquery-2.0.3.min.js'>"+"<"+"script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>"+"<"+"script>");
</script>
<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='/Public/assets/js/jquery.mobile.custom.min.js'>"+"<"+"script>");
		</script>
		<script src="/Public/assets/js/bootstrap.min.js"></script>
		<script src="/Public/assets/js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="assets/js/excanvas.min.js"></script>
		<![endif]-->
        <script src="/Public/assets/js/ace-extra.min.js"></script>
		<script src="/Public/assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="/Public/assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="/Public/assets/js/jquery.slimscroll.min.js"></script>
		<script src="/Public/assets/js/jquery.easy-pie-chart.min.js"></script>
		<script src="/Public/assets/js/jquery.sparkline.min.js"></script>
		<script src="/Public/assets/js/flot/jquery.flot.min.js"></script>
		<script src="/Public/assets/js/flot/jquery.flot.pie.min.js"></script>
		<script src="/Public/assets/js/flot/jquery.flot.resize.min.js"></script>
		

		<!-- ace scripts -->

		<script src="/Public/assets/js/ace-elements.min.js"></script>
		<script src="/Public/assets/js/ace.min.js"></script>





			


		<!-- inline scripts related to this page -->






    <script type="text/javascript">
      _hide_public_loading();
        <?php if($parent_id != 0): ?>$(function(){
                    $("#parent_id option[value=<?php echo ($parent_id); ?>]").attr("selected", "selected");

                });<?php endif; ?>

        <?php if($is_add == 1): ?>$(function(){
                    $("#parent_id").attr("disabled","disabled");
                });<?php endif; ?>
    </script>

</body>
</html>